<!DOCTYPE html>
<!--suppress ALL-->
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <title>租房网-出租房源</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=yes">
    <link rel="stylesheet" type="text/css" href="/css/pc/client/common.css">
    <!--[if lte IE 8]>
    <script src="/common/js/html5shiv.js"></script>
    <![endif]-->
    <script src="https://hm.baidu.com/hm.js?d6b1afd88bad903f6c136281ac832114"></script>
    <script type="text/javascript">
        var _hmt = _hmt || [];
        (function () {
            var href = window.location.href;
            if (!href.match('test') && !href.match('mt')) {
                var hm = document.createElement("script");
                hm.src = "https://hm.baidu.com/hm.js?d6b1afd88bad903f6c136281ac832114";
                var s = document.getElementsByTagName("script")[0];
                s.parentNode.insertBefore(hm, s);
            }
        })();
    </script>
    <link rel="stylesheet" type="text/css" href="/css/pc/client/personal.css">
    <link rel="stylesheet" type="text/css" href="/css/pc/client/memApartmentMng.css">
    <link rel="stylesheet" type="text/css" href="/css/pc/client/addApart.css">
    <link rel="stylesheet" href="/libs/webupload/webuploader.css">
    <style type="text/css">
        .con-box .con-sku-items {
            width: 790px;
        }

        .att_rent_type {
            position: absolute !important;
            right: 58px;
            top: 0px;
        }

        #form_box {
            margin-top: 0px;
        }

        #pic_apart_con .pic_shen_trangle {
            position: absolute;
            top: 118px;
            border: 20px solid rgba(0, 0, 0, 0.7);
            width: 230px;
        }

        #pic_apart_con .shen {
            position: absolute;
            top: 137px;
            left: 90px;
            line-height: 0px !important;
            color: #ffffff;
        }
    </style>
</head>
<body>
<input type="hidden" th:value="${session.username}" name="username" id="username">
<div class="header">
    <div class="nav-wrap">
        <div class="logo">
            <a rel="nofollow" href="#">
                <img src="/img/pc/client/home/logo.png" height="32" alt="租房网">
            </a>
        </div>
        <div class="city-wrap" style="cursor: default;">
            <span th:text="${cityName}"></span><i></i>
            <ul>
                    <span th:each="retAddress,status:${retAddressList}">
                        <span th:if="${retAddress.cityName} != ${cityName}">
                             <li><a rel="nofollow" th:href="@{/retPersonage/personage(id=${retAddress.id})}" th:text="${retAddress.cityName}"></a></li>
                        </span>
                    </span>
            </ul>
            <!-- <span>[<a rel="nofollow" href="https://www.zufun.cn/index" class="link" target="_blank">切换城市</a>]</span> -->
        </div>
        <div class="nav-items">
            <div class="nav-item">
                <a rel="nofollow" th:href="@{/retAddress/index}">首页</a>
            </div>

            <div class="nav-item">
                <a th:href="@{/retAddress/searchList}">租房</a>
            </div>

            <div class="nav-item">
                <a rel="nofollow" href="https://www.zufun.cn/platform" target="_blank">物业平台</a>
            </div>
            <div class="nav-item user-down-wrap" id="login_holder">
                <a href="#loginModal" rel="nofollow" data-toggle="modal" data-target="#loginModal">注册/登录</a>
            </div>
        </div>
    </div>
</div>
<div id="container">
    <div id="left_nav">
        <div class="per-info">
            <ul>
                <li>
                    <a href="/retPersonage/personage">个人信息</a>
                </li>
                <li>
                    <a href="/retPersonage/message">
                        系统消息
                    </a>
                </li>
                <li>
                    <a href="/retPersonage/favorite">
                        我的收藏
                    </a>
                </li>
                <li>
                    <a href="/retPersonage/appointment">
                        预约管理
                    </a>
                </li>
                <li class="per-active">
                    <a href="/retPersonage/apt/index">
                        出租房源
                    </a>
                </li>
            </ul>
        </div>
    </div>
    <div id="main">
        <div class="con-title">
            <div>房源管理</div>
            <ul class="nav-btns">
                <li class="nav-btn">
                    <a id="fabu1" target="_blank">发布房源</a>
                </li>
            </ul>
        </div>

    </div>
    <!-- 个人中心的内容区域 end -->
</div>
<div id="mask">
    <div id="edit_apart_con" class="alert" style="width:928px;">
        <form id="edit_apart_form" novalidate="novalidate">

        </form>
    </div>
    <div id="pic_apart_con" class="con-box">
        <div class="pic-box">
            <div id="pic_apart_holder">
            </div>
            <div class="pic-holder add-pic">
                <div id="upload_holder"></div>
                <!-- <input accept="image/*" multiple="multiple" type="file" class="upload-holder"/> -->
            </div>
        </div>
    </div>
</div>
<!-- /buldings -->
<div style="clear:both"></div>
<div class="new-footer" style="margin-top:20px;">
    <div class="site-zufun">
        <div class="site-info">
            <p>
                <a rel="nofollow" href="https://www.zufun.cn/about" target="_blank">关于我们</a><span>|</span>
                <a rel="nofollow" href="https://www.zufun.cn/question" target="_blank">常见问题</a><span>|</span>
                <a rel="nofollow" href="https://www.zufun.cn/business" target="_blank">商务合作</a><span>|</span>
                <a rel="nofollow" href="https://www.zufun.cn/job" target="_blank">招聘信息</a><span>|</span>
                <a rel="nofollow" href="https://www.zufun.cn/protocol" target="_blank">服务声明</a><span>|</span>
                <a rel="nofollow" href="javascript:void(0);" onclick="suggest();">意见反馈</a><span>|</span>
                <a rel="nofollow" href="/sitemap" target="_blank">网站地图</a>
            </p>
            <div class="call-us">
                <div class="qrcode-wrap">
                    <span style="display: block;line-height: 1.3;white-space: nowrap;letter-spacing:2px;position: absolute;right:-30px;top: 17px;color:#999;">下载APP</span>
                    <i class="icon icon-mobile" style="position:relative;right:60px;"></i>
                    <i class="icon icon-app-qrcode qrcode" style="left:-102px;"></i>
                </div>
                <div class="qrcode-wrap">
                    <span style="display: block;line-height: 1.3;white-space: nowrap;letter-spacing:2px;position: absolute;left:30px;top: 17px;color:#999;">关注公众号</span>
                    <i class="icon icon-weixin"></i>
                    <i class="icon icon-weixin-qrcode qrcode"></i>
                </div>
            </div>
        </div>
        <div class="site-copyright" style="text-align:left;">
            <p>©2015-2020 深圳易找房信息技术有限公司&nbsp;&nbsp;版权所有&nbsp;&nbsp;
                <a href="http://beian.miit.gov.cn" target="_blank" rel="nofollow">粤ICP备15073386号</a>
            </p>
            <span class="hotline" style="position: absolute;top: 30px;right: 0;font-size: 14px;">服务热线：132-6682-1881（9:00 - 18:00）</span>
        </div>
    </div>
</div>
<script id="suggest_tpl" type="text/html">
    <form id="suggest_form">
        <div class="form-group">
            <div class="textarea-group">
                <label>反馈内容</label>
                <textarea name="content" placeholder="欢迎提出您在使用过程中遇到的问题或宝贵建议，感谢您的支持。"></textarea>
            </div>
            <div class="input-group" style="height:100px;">
                <label>联系方式</label>
                <input type="text" name="email" placeholder="请留下您的手机或邮箱" style="margin-top:5px;" value="{{fu_mobile}}">
            </div>
            <div class="button-group">
                <input type="submit" value="提交反馈">
            </div>
        </div>
    </form>
</script>
<script src="/common/js/jquery-1.11.3.min.js"></script>
<script src="/libs/yzf/modules/yzf.tab.js"></script>
<script src="/libs/yzf/modules/yzf.modal.js"></script>
<script src="/libs/yzf/modules/yzf.button.js"></script>
<!--[if !IE]> -->
<script src="/js/pc/client/clientCommon.js"></script>
<!-- <![endif]-->
<!--[if gte IE 9]>
<script src="/js/pc/client/clientCommon.js"></script>
<![endif]-->
<!--[if lte IE 8]>
<script src="/common/js/jquery.cookie.js"></script>
<script src="/common/js/artForm.js"></script>
<script src="/common/js/md5.js"></script>
<script src="/common/js/base.js"></script>
<script src="/common/js/validateConfig.js"></script>
<script src="/common/js/jquery.validate.js"></script>
<script src="/js/pc/client/loginAndRegist2.js"></script>
<script src="/libs/artdialog/dist/dialog-min.js"></script>
<script src="/common/js/template.js"></script>
<script src="/common/js/jquery.lazyload.min.js"></script>
<![endif]-->
<!--[if lt IE 8]>
<script src="/libs/JSON-js-master/json2.js"></script>
<![endif]-->
<!--[if lt IE 10]>
<script src="/common/js/normalize.js"></script>
<![endif]-->
<script src="/libs/datetimepicker/jquery.datetimepicker.js"></script>
<script src="/libs/webupload/webuploader.nolog.min.js"></script>
<script src="/js/pc/client/memApartmentMng.js"></script>
<script th:src="@{/lib/layui/layui.js}"></script>
<script type="text/javascript" th:inline="javascript">
    layui.use(["element", "form", "laydate", "okLayer", "okUtils"], function () {
        let form = layui.form;
        let laydate = layui.laydate;
        let okLayer = layui.okLayer;
        let okUtils = layui.okUtils;

        /*laydate.render({elem: "#birthday", type: "datetime"});

        form.verify({
            birthdayVerify: [/^((((1[6-9]|[2-9]\d)\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))(\s(([01]\d{1})|(2[0123])):([0-5]\d):([0-5]\d))?$/, '日期格式不正确']
        });*/

        c();

        function fabu() {
            var ccc = [[${retRentalInformationList}]];
            var str = "<div class='con-box'>";
            $.each(ccc, function (index, value) {
                if(ccc != null && ccc!= "") {
                    str += " <table class='table'>" +
                        "<tbody><tr class='table-title'>" +
                        "<td colspan='4'>" + this.lease_out + "</td>" +
                        "<td></td></tr>" +
                        "<tr data-status='"+this.TYPE+"'>" +
                        "<td class='table-pic-wrap'>" +
                        "<div class='col-pic-holder'>" +
                        "<img class='lazy' data-original='" + this.ret_picture + "' src='" + this.ret_picture + "' style='display: block;'>" +
                        "</div></td>" +
                        "<td class='table-des' data-id=''>" +
                        "<p><a target='_blank'>"+this.cityName+"</a></p>" +
                        "<p>" + this.huxing_type + "</p>" +
                        "</td>" +
                        "<td class='att-price'>" +
                        "<p><span class='c-orange'>" + this.money + "</span>元/月</p>" +
                        "<p class='att-update'>" +
                        "<span>更新："+timestampToTime(this.FAQISHIJIAN)+"</span>" +
                        "<span title='刷新可以让房源在搜索结果中更靠前' class='icon-reload' data-id=''></span>" +
                        "</p></td>" +
                        "<td class='size2 tabel-time'>" +
                        "<p>"+this.TYPE+"</p></td>" +
                        "<td class='table-btns size3' data-id=''>" +
                        "<p><a href='/retAddress/houseDetails?id=" + this.ret_id + "' class='c-blue' target='_blank'>预览</a></p>" +
                        "<p class='edit-apart' id='"+this.ret_id+"'>编辑</p>" +
                       // "<p class='pic-apart'>图片管理</p>" +
                        "</td></tr></tbody></table>";
                }else{
                    str+="<div class='con-box'><div class='col-info no-apt'><span>暂无房源</span></div></div>"
                }
            })
            str += "</div>";
            $("#main").append(str)
        };
        fabu();

        $(document).on('click','.edit-apart',function(){
            var id = $(this).attr("id");
            window.location.href = "/retPersonage/apt/edit?id="+id

        });


        $("#id").click(function () {
            id = $(this).val();
        })
        $("#fabu1").click(function () {
            window.location.href = "/retPersonage/apt/new";
        })
    });

    function timestampToTime(timestamp) {
        var dateee = new Date(timestamp).toJSON();
        console.log(dateee);
        var date = new Date(+new Date(dateee)+8*3600*1000).toISOString().replace(/T/g,' ').replace(/\.[\d]{3}Z/,'')  
        return date;
    }

    function c() {
        var user = $("#username").val();
        var t = $("#login_holder");
        user ? t.html('<div class="drop-wrap"><a href="/retPersonage/personage"><span class="icon_user"></span><span>' + user + '</span></a><ul class="arrow-top nav-down-wrap"><li><a href="/retPersonage/personage" target="_blank">个人中心</a></li><li><a href="/retAddress/logout" data-toggle="logout">退出登录</a></li></ul>') : t.html('<a href="#loginModal" rel="noffolow" data-toggle="modal" data-target="#loginModal">注册/登录</a>')
    }
</script>
</body>
</html>